extends BattleState

@onready var battle_main = $"../.."
@onready var statue = $"../../Statue"
@onready var card_table = $"../../CardTable"
@onready var prop_bar = $"../../UICanvasLayer/PropBar"

func enter() -> void:
	var current_monster_group_id = battle_main.current_monster_group_id
	if MonsterManager.MONSTER_STATUE_DICT.has(current_monster_group_id):
		statue.prepare(MonsterManager.MONSTER_STATUE_DICT[current_monster_group_id])
		
	var player_state: PlayerInBattleState = Globals.player_state
	if player_state != null:
		for prop_id in player_state.prop_id_array:
			var prop = Globals.ALL_PROP_TRES_DICT.prop_dict[prop_id]
			prop.before_battle()
			player_state.prop_array.append(prop)
		
	card_table.prepare()
	prop_bar.prepare()
	
	transition_requested.emit(self, State.STATE_IDLE)


